home *** CD-ROM | disk | FTP | other *** search
- ;figure 1
-
- ;this routine (until RET) must be called during initialization
- ;of the main program. The whole thing must be loaded prior to
- ;being called.
- 0008 XOR A ;make A = 0
- 0009 LD I,A ;hi byte of interrupt vector
- 000B IM2 ;PIO set up to use IM2 only
- 000D EI ;enable them
- 000E RET
- 000F DB 00 ;skip to make next hit even
- 0010 DW 0012H ;vector to next word on interrupt
- 0012 EI ;do nothing interrupt service
- 0013 RETI ;go back where we were
-
-
-
-
-
- /* figure 2 */
- outp(0X23,0X0F); /* set port to output mode */
- outp(0X23,0X87); /* enable interrupts */
-
- outp(0X23,0X10); /* set low byte of interrupt vector */
- outp(0X21,0X4A); /* initialize port */
-
- outp(0X0F,0x18); /* i used the "normal" SIO initialization */
- outp(0X0F,1); /* rather than the one in st.com except */
- outp(0X0F,0); /* for wr#5 there i used the one supplied */
- outp(0X0F,3);
- outp(0X0F,0xC1);
- outp(0X0F,4);
- outp(0X0F,0x44);
- outp(0X0F,5);
- outp(0X0F,0x68); /* this is abnormal but from st.com */
- call(0x08,0,0,0,0); /* this calls the cpu initialization */
- /* i didn't use it during trial runs */
- /* an oversight on my part and it */
- /* appeared to work without it but to */
- /* on the safe side it should be */
- /* included */
-
-
-
-
-
- /* figure 3 */
- outp(0X21,0X0A); /* the following take the modem off-hook */
- sleep(1); /* delays a bit */
- outp(0X21,0X1A); /* makes parallel port ready for modem work */
- outp(0X0F,0X05); /* selects wr#5 */
- outp(0X0F,0X6A); /* selects modem in originate mode outp(0X0F,0XEA) */
- term(); /* would make it answer mode and finally goes to */
- /* terminal mode of yam */
-
- outp(0X21,0X4A); /* is the code to go back on-hook (hangup) */
-
-
-
-
-
-
- ;figure 4
- LD C,A ;put it in C for later
- IN A,(021H) ;get present value of port
- AND 0F0H ;strip low nibble
- OR C ;put number to be dialed in proper place
- RES 7,A ;lower dial command
- OUT (021H),A ;put it out
- SET 7,A ;raise dial command
- OUT (021H),A ;put it out
- RES 7,A ;lower dial command
- OUT (021H),A ;put it out